package cn.xopencode.recordservice.dal.mysql.mapper.pdroom;

import cn.xopencode.recordservice.dal.mysql.dataobject.pdroom.PowerDistributionRoomDO;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface PowerDistributionRoomMapper extends BaseMapper<PowerDistributionRoomDO> {

    /**
     * 根据配电室名称模糊匹配
     * @param roomName
     * @return
     */
    default List<PowerDistributionRoomDO> selectLikeRoomName(String roomName){
        return selectList(new QueryWrapper<PowerDistributionRoomDO>().like("room_name",roomName));
    }
}
